package com.atguigu.day21.obj04;

import java.io.Serial;
import java.io.Serializable;

public class Person implements Serializable {
    @Serial
    private static final long serialVersionUID = -1813587815540204748L;
    //序列化版本号
    //private static final long serialVersionUID = 2L;

    private String name;
    private int age;
    private char gender;
    private transient double salary;
    private static String country;

    public Person(String name, int age, char gender, double salary, String country) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.salary = salary;
        this.country = country;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                ", salary=" + salary +
                ", country='" + country + '\'' +
                '}';
    }
}
